#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
#include <unordered_map>
int main() {
    string s1, s2;
    cin >> s1;
    cin >> s2;
    unordered_map<char, int> hash;
    for (auto e : s1)
    {
        hash[e]++;
    }
    int count = 0;
    unordered_map<char, int> hash2;
    for (auto e : s2)
    {

        if (hash.count(e) == 0)
        {

            cout << "No" << endl;
            return 0;
        }
        hash2[e]++;
    }
    // cout<<hash.size()<<":"<<hash2.size()<<endl;
    // if(hash.size()!=hash2.size())
    // {
    //     cout<<"No"<<endl;
    //     return 0;
    // }
    cout << "Yes" << endl;
    return 0;
}
#include <iostream>
using namespace std;
#include <vector>
#include <functional>
int main() {
    int n;
    //int _max = 0;
    cin >> n;
    vector<int> v(3 * n, 0);
    for (int i = 0; i < 3 * n; i++)
    {
        cin >> v[i];
    }
    sort(v.begin(), v.end());
    int _max = 0;
    for (int i = 1; i < 3 * n; i += 3)
    {
        _max += v[i];
    }
    cout << _max << endl;
    return 0;
}
#include <iostream>
using namespace std;
#include <vector>
#include <unordered_map>
int main() {
    unordered_map<int, int> hash;
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        int val;
        cin >> val;
        hash[val] += val;
    }
    int size = 2 * hash.size();
    vector<pair<int, int>> v(2 * hash.size(), make_pair(0, 0));
    int i = 0;
    for (auto& e : hash)
    {
        if (i == 0)
        {
            v[0] = e;
            i++;
        }
        else if (v[i - 1].first + 1 == e.first)
        {
            //cout<<i<<"-";
            v[i++] = e;
            //cout<<e.first<<endl;
        }
        else {
            i++;
            //cout<<i<<"-";
            v[i++] = e;
            //cout<<e.first<<endl;
        }
        cout << e.first << ":" << e.second << endl;

    }
    vector<vector<int>> dp(2 * hash.size(), vector<int>(2, 0));
    dp[0][0] = v[0].second;
    dp[1][0] = v[1].second;
    dp[1][1] = max(dp[0][0], dp[0][1]);
    cout << v[2].first << " " << v[2].second << endl;
    for (int i = 2; i < 2 * n; i++)
    {
        cout << v[i].second << endl;
        dp[i][0] = max(dp[i - 1][1] + v[i].second, dp[i - 2][0] + v[i].second);
        dp[i][1] = max(dp[i - 1][1], dp[i - 1][0]);
        cout << dp[i][0] << ":" << dp[i][1] << endl;
    }
    cout << max(dp[size - 1][0], dp[size - 1][1]) << endl;
    return 0;

}